A depth of field as deep as possible is required for an endoscope system so that the user can easily perform diagnosis and treatment. In recent years, the depth of field of an endoscope system has become shallow along with the use of an image sensor having a large number of pixels, and an endoscope system that performs an autofocus (AF) function has been proposed.
In the endoscope system, tissue is irradiated with illumination light emitted from an illumination section, and an image is acquired as a result of focusing resulting reflected light by an objective lens. Generally, in the endoscope system, the illumination section and the objective lens are disposed close to an insert section to be inserted into a body. Thus, light as a result of specular reflection of the illumination light at various positions of the surface of tissue as the object is incident on the objective lens, forming bright spots. As a result, the acquired image includes multiple high luminance portions (saturated portions) of various sizes.
In general contrast AF control, a focus lens position with the largest contrast value is determined to be an in-focus lens position. Unfortunately, when an image includes high luminance portions, the largest contrast value might be achieved at a lens position deviated from the actual in-focus lens position due to an increased edge in the high luminance portions attributable to blurring (as will be described in detail below with reference to FIG. 1A). In the high luminance portions, contrast information on the object is lost due to saturation of a pixel value of the image, and thus the contrast value cannot be accurately calculated. All things considered, the contrast AF control might fail to accurately bring the object into focus when the image includes the high luminance portions.